home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / kernel / lfs / lfsSegUsageInt.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-12-19  |  2.1 KB  |  64 lines

  1. /*
  2.  * lfsSegUsageInt.h --
  3.  *
  4.  *    Declarations of LFS segment ussage routines and data structures
  5.  *    private to the Lfs module.
  6.  *
  7.  * Copyright 1989 Regents of the University of California
  8.  * Permission to use, copy, modify, and distribute this
  9.  * software and its documentation for any purpose and without
  10.  * fee is hereby granted, provided that the above copyright
  11.  * notice appear in all copies.  The University of California
  12.  * makes no representations about the suitability of this
  13.  * software for any purpose.  It is provided "as is" without
  14.  * express or implied warranty.
  15.  *
  16.  * $Header: /cdrom/src/kernel/Cvsroot/kernel/lfs/lfsSegUsageInt.h,v 1.8 92/09/03 18:13:30 shirriff Exp $ SPRITE (Berkeley)
  17.  */
  18.  
  19. #ifndef _LFSSEGUSAGEINT
  20. #define _LFSSEGUSAGEINT
  21.  
  22. #include <lfsUsageArray.h>
  23.  
  24. /* constants */
  25.  
  26. /* data structures */
  27.  
  28. /* procedures */
  29.  
  30. extern void LfsSegUsageInit _ARGS_((void));
  31.  
  32. extern void LfsSetSegUsage _ARGS_((struct Lfs *lfsPtr, int segNumber, 
  33.             int activeBytes));
  34. extern ReturnStatus LfsGetLogTail _ARGS_((struct Lfs *lfsPtr, Boolean cantWait,
  35.             LfsSegLogRange *logRangePtr, int *startBlockPtr ));
  36.  
  37. extern void LfsSetLogTail _ARGS_((struct Lfs *lfsPtr, 
  38.             LfsSegLogRange *logRangePtr, int startBlock, 
  39.             int activeBytes, int timeOfLastWrite));
  40.  
  41. extern void LfsMarkSegsClean _ARGS_((struct Lfs *lfsPtr, int numSegs, 
  42.                 LfsSegList  *segs));
  43. extern void LfsSetDirtyLevel _ARGS_((struct Lfs *lfsPtr, int dirtyActiveBytes));
  44.  
  45. extern int LfsGetSegsToClean _ARGS_((struct Lfs *lfsPtr, 
  46.             int maxSegArrayLen, LfsSegList *segArrayPtr, 
  47.             int *minNeededToCleanPtr, int *maxAvailToWritePtr));
  48.  
  49. extern ReturnStatus LfsSegUsageFreeBlocks _ARGS_((struct Lfs *lfsPtr, 
  50.             int blockSize, int blockArrayLen, 
  51.             LfsDiskAddr *blockArrayPtr));
  52. extern ReturnStatus LfsSegUsageAllocateBytes _ARGS_((struct Lfs *lfsPtr,                 int numBytes));
  53. extern ReturnStatus LfsSegUsageFreeBytes _ARGS_((struct Lfs *lfsPtr, 
  54.             int numBytes));
  55.  
  56. extern void LfsSegUsageCheckpointUpdate _ARGS_((struct Lfs *lfsPtr,
  57.             char *checkPointPtr, int size));
  58.  
  59. extern Boolean LfsSegUsageEnoughClean _ARGS_((struct Lfs *lfsPtr,
  60.                 int dirtyBytes));
  61.  
  62. #endif /* _LFSSEGUSAGEINT */
  63.  
  64.